package algorithm.h23d_p17;

import org.junit.jupiter.api.Test;

import java.util.Random;
import java.util.Scanner;

public class FindRobotPathTest {
    @Test
    public void tset1(){
        int[][] matrix1 = {
                {1, 1, 1, 1},
                {0, 1, 0, 1},
                {0, 1, 0, 1}

        };
//        System.out.println("matrix:");
        FindRobotPath.run(matrix1);
        int[][] matrix2 = {
                {1, 1, 1, 1},


        };
        FindRobotPath.run(matrix1);
        int[][] matrix3 = {
                {1, 1, 1, 1},
                {1, 1, 0, 1},
                {1, 0, 1, 1},

        };
        FindRobotPath.run(matrix3);
        int[][] matrix4 =null;
        FindRobotPath.run(matrix4);

    }
    @Test
    public void test2(){
//        测试用例：随机矩阵
        Random r= new Random();
        Scanner sc =new Scanner(System.in);
        int rows=r.nextInt(5)+1;
        int cols=r.nextInt(5)+1;

//        获取一个随机矩阵
        int [][] matrixRandom=RandomMatrixGenerator.start(rows,cols);
        System.out.println("-------------------------------");
//        System.out.println("Test Case : " + findMaxArea.FindMaxAreaTwoDimention(matrixRandom)); // 12

        FindRobotPath.run(matrixRandom);
    }
}
